From 21e7ca0fa3e8897ad641ed715032eb7f467f045d Mon Sep 17 00:00:00 2001 From: robertl Date: Sat, 2 Sep 2006 23:28:21 +0000 Subject: [PATCH] Avoid non-posix cfmakeraw. --- gbser_posix.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gbser_posix.c b/gbser_posix.c index 6b37effe8..afbc5ba66 100644 --- a/gbser_posix.c +++ b/gbser_posix.c @@ -183,7 +183,13 @@ int gbser_set_port(void *handle, unsigned speed, unsigned bits, unsigned parity, h->new_tio = h->old_tio; /* clear bits */ - cfmakeraw(&h->new_tio); +// cfmakeraw(&h->new_tio); + h->new_tio.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP + |INLCR|IGNCR|ICRNL|IXON); + h->new_tio.c_oflag &= ~OPOST; + h->new_tio.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); + h->new_tio.c_cflag &= ~(CSIZE|PARENB); + h->new_tio.c_cflag |= CS8; h->new_tio.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | IXON); -- 2.30.2